
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html><head><title>Python: module httplib2.socks</title>
</head><body bgcolor="#f0f0f8">

<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="heading">
<tr bgcolor="#7799ee">
<td valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial">&nbsp;<br><big><big><strong><a href="httplib2.html"><font color="#ffffff">httplib2</font></a>.socks</strong></big></big></font></td
><td align=right valign=bottom
><font color="#ffffff" face="helvetica, arial"><a href=".">index</a><br><a href="file:/usr/local/google/home/jcgregorio/projects/apiclient/httplib2/socks.py">/usr/local/google/home/jcgregorio/projects/apiclient/httplib2/socks.py</a></font></td></tr></table>
    <p><tt>SocksiPy&nbsp;-&nbsp;Python&nbsp;SOCKS&nbsp;module.<br>
Version&nbsp;1.00<br>
&nbsp;<br>
Copyright&nbsp;2006&nbsp;Dan-Haim.&nbsp;All&nbsp;rights&nbsp;reserved.<br>
&nbsp;<br>
Redistribution&nbsp;and&nbsp;use&nbsp;in&nbsp;source&nbsp;and&nbsp;binary&nbsp;forms,&nbsp;with&nbsp;or&nbsp;without&nbsp;modification,<br>
are&nbsp;permitted&nbsp;provided&nbsp;that&nbsp;the&nbsp;following&nbsp;conditions&nbsp;are&nbsp;met:<br>
1.&nbsp;Redistributions&nbsp;of&nbsp;source&nbsp;code&nbsp;must&nbsp;retain&nbsp;the&nbsp;above&nbsp;copyright&nbsp;notice,&nbsp;this<br>
&nbsp;&nbsp;&nbsp;list&nbsp;of&nbsp;conditions&nbsp;and&nbsp;the&nbsp;following&nbsp;disclaimer.<br>
2.&nbsp;Redistributions&nbsp;in&nbsp;binary&nbsp;form&nbsp;must&nbsp;reproduce&nbsp;the&nbsp;above&nbsp;copyright&nbsp;notice,<br>
&nbsp;&nbsp;&nbsp;this&nbsp;list&nbsp;of&nbsp;conditions&nbsp;and&nbsp;the&nbsp;following&nbsp;disclaimer&nbsp;in&nbsp;the&nbsp;documentation<br>
&nbsp;&nbsp;&nbsp;and/or&nbsp;other&nbsp;materials&nbsp;provided&nbsp;with&nbsp;the&nbsp;distribution.<br>
3.&nbsp;Neither&nbsp;the&nbsp;name&nbsp;of&nbsp;Dan&nbsp;Haim&nbsp;nor&nbsp;the&nbsp;names&nbsp;of&nbsp;his&nbsp;contributors&nbsp;may&nbsp;be&nbsp;used<br>
&nbsp;&nbsp;&nbsp;to&nbsp;endorse&nbsp;or&nbsp;promote&nbsp;products&nbsp;derived&nbsp;from&nbsp;this&nbsp;software&nbsp;without&nbsp;specific<br>
&nbsp;&nbsp;&nbsp;prior&nbsp;written&nbsp;permission.<br>
&nbsp;&nbsp;&nbsp;<br>
THIS&nbsp;SOFTWARE&nbsp;IS&nbsp;PROVIDED&nbsp;BY&nbsp;DAN&nbsp;HAIM&nbsp;"AS&nbsp;IS"&nbsp;AND&nbsp;ANY&nbsp;EXPRESS&nbsp;OR&nbsp;IMPLIED<br>
WARRANTIES,&nbsp;INCLUDING,&nbsp;BUT&nbsp;NOT&nbsp;LIMITED&nbsp;TO,&nbsp;THE&nbsp;IMPLIED&nbsp;WARRANTIES&nbsp;OF<br>
MERCHANTABILITY&nbsp;AND&nbsp;FITNESS&nbsp;FOR&nbsp;A&nbsp;PARTICULAR&nbsp;PURPOSE&nbsp;ARE&nbsp;DISCLAIMED.&nbsp;IN&nbsp;NO<br>
EVENT&nbsp;SHALL&nbsp;DAN&nbsp;HAIM&nbsp;OR&nbsp;HIS&nbsp;CONTRIBUTORS&nbsp;BE&nbsp;LIABLE&nbsp;FOR&nbsp;ANY&nbsp;DIRECT,&nbsp;INDIRECT,<br>
INCIDENTAL,&nbsp;SPECIAL,&nbsp;EXEMPLARY,&nbsp;OR&nbsp;CONSEQUENTIAL&nbsp;DAMAGES&nbsp;(INCLUDING,&nbsp;BUT&nbsp;NOT<br>
LIMITED&nbsp;TO,&nbsp;PROCUREMENT&nbsp;OF&nbsp;SUBSTITUTE&nbsp;GOODS&nbsp;OR&nbsp;SERVICES;&nbsp;LOSS&nbsp;OF&nbsp;USE,&nbsp;DATA<br>
OR&nbsp;PROFITS;&nbsp;OR&nbsp;BUSINESS&nbsp;INTERRUPTION)&nbsp;HOWEVER&nbsp;CAUSED&nbsp;AND&nbsp;ON&nbsp;ANY&nbsp;THEORY&nbsp;OF<br>
LIABILITY,&nbsp;OR&nbsp;TORT&nbsp;(INCLUDING&nbsp;NEGLIGENCE&nbsp;OR&nbsp;OTHERWISE)&nbsp;ARISING&nbsp;IN&nbsp;ANY&nbsp;WAY&nbsp;OUT<br>
OF&nbsp;THE&nbsp;USE&nbsp;OF&nbsp;THIS&nbsp;SOFTWARE,&nbsp;EVEN&nbsp;IF&nbsp;ADVISED&nbsp;OF&nbsp;THE&nbsp;POSSIBILITY&nbsp;OF&nbsp;SUCH&nbsp;DAMANGE.<br>
&nbsp;<br>
&nbsp;<br>
This&nbsp;module&nbsp;provides&nbsp;a&nbsp;standard&nbsp;socket-like&nbsp;interface&nbsp;for&nbsp;Python<br>
for&nbsp;tunneling&nbsp;connections&nbsp;through&nbsp;SOCKS&nbsp;proxies.</tt></p>
<p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#aa55cc">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Modules</strong></big></font></td></tr>
    
<tr><td bgcolor="#aa55cc"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><table width="100%" summary="list"><tr><td width="25%" valign=top><a href="socket.html">socket</a><br>
</td><td width="25%" valign=top><a href="struct.html">struct</a><br>
</td><td width="25%" valign=top><a href="sys.html">sys</a><br>
</td><td width="25%" valign=top></td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ee77aa">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Classes</strong></big></font></td></tr>
    
<tr><td bgcolor="#ee77aa"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl>
<dt><font face="helvetica, arial"><a href="exceptions.html#Exception">exceptions.Exception</a>(<a href="exceptions.html#BaseException">exceptions.BaseException</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="httplib2.socks.html#ProxyError">ProxyError</a>
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="httplib2.socks.html#GeneralProxyError">GeneralProxyError</a>
</font></dt><dt><font face="helvetica, arial"><a href="httplib2.socks.html#HTTPError">HTTPError</a>
</font></dt><dt><font face="helvetica, arial"><a href="httplib2.socks.html#Socks4Error">Socks4Error</a>
</font></dt><dt><font face="helvetica, arial"><a href="httplib2.socks.html#Socks5AuthError">Socks5AuthError</a>
</font></dt><dt><font face="helvetica, arial"><a href="httplib2.socks.html#Socks5Error">Socks5Error</a>
</font></dt></dl>
</dd>
</dl>
</dd>
<dt><font face="helvetica, arial"><a href="socket.html#_socketobject">socket._socketobject</a>(<a href="__builtin__.html#object">__builtin__.object</a>)
</font></dt><dd>
<dl>
<dt><font face="helvetica, arial"><a href="httplib2.socks.html#socksocket">socksocket</a>
</font></dt></dl>
</dd>
</dl>
 <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="GeneralProxyError">class <strong>GeneralProxyError</strong></a>(<a href="httplib2.socks.html#ProxyError">ProxyError</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="httplib2.socks.html#GeneralProxyError">GeneralProxyError</a></dd>
<dd><a href="httplib2.socks.html#ProxyError">ProxyError</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors inherited from <a href="httplib2.socks.html#ProxyError">ProxyError</a>:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="GeneralProxyError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#GeneralProxyError-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;x.__class__.__doc__&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#GeneralProxyError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="GeneralProxyError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#GeneralProxyError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="GeneralProxyError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#GeneralProxyError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="GeneralProxyError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#GeneralProxyError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="GeneralProxyError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#GeneralProxyError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="GeneralProxyError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="GeneralProxyError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#GeneralProxyError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="GeneralProxyError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#GeneralProxyError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="GeneralProxyError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="GeneralProxyError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#GeneralProxyError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<dl><dt><a name="GeneralProxyError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="HTTPError">class <strong>HTTPError</strong></a>(<a href="httplib2.socks.html#ProxyError">ProxyError</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="httplib2.socks.html#HTTPError">HTTPError</a></dd>
<dd><a href="httplib2.socks.html#ProxyError">ProxyError</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors inherited from <a href="httplib2.socks.html#ProxyError">ProxyError</a>:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="HTTPError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#HTTPError-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;x.__class__.__doc__&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#HTTPError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="HTTPError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#HTTPError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="HTTPError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#HTTPError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="HTTPError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#HTTPError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="HTTPError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#HTTPError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="HTTPError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="HTTPError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#HTTPError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="HTTPError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#HTTPError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="HTTPError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="HTTPError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#HTTPError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<dl><dt><a name="HTTPError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="ProxyError">class <strong>ProxyError</strong></a>(<a href="exceptions.html#Exception">exceptions.Exception</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="httplib2.socks.html#ProxyError">ProxyError</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="ProxyError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;x.__class__.__doc__&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#ProxyError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="ProxyError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="ProxyError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="ProxyError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="ProxyError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="ProxyError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="ProxyError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="ProxyError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="ProxyError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="ProxyError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#ProxyError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<dl><dt><a name="ProxyError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Socks4Error">class <strong>Socks4Error</strong></a>(<a href="httplib2.socks.html#ProxyError">ProxyError</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="httplib2.socks.html#Socks4Error">Socks4Error</a></dd>
<dd><a href="httplib2.socks.html#ProxyError">ProxyError</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors inherited from <a href="httplib2.socks.html#ProxyError">ProxyError</a>:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="Socks4Error-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks4Error-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;x.__class__.__doc__&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#Socks4Error-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="Socks4Error-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks4Error-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="Socks4Error-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks4Error-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="Socks4Error-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks4Error-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="Socks4Error-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks4Error-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="Socks4Error-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="Socks4Error-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks4Error-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="Socks4Error-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks4Error-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="Socks4Error-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="Socks4Error-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks4Error-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<dl><dt><a name="Socks4Error-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Socks5AuthError">class <strong>Socks5AuthError</strong></a>(<a href="httplib2.socks.html#ProxyError">ProxyError</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="httplib2.socks.html#Socks5AuthError">Socks5AuthError</a></dd>
<dd><a href="httplib2.socks.html#ProxyError">ProxyError</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors inherited from <a href="httplib2.socks.html#ProxyError">ProxyError</a>:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="Socks5AuthError-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5AuthError-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;x.__class__.__doc__&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#Socks5AuthError-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="Socks5AuthError-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5AuthError-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="Socks5AuthError-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5AuthError-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="Socks5AuthError-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5AuthError-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="Socks5AuthError-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5AuthError-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="Socks5AuthError-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="Socks5AuthError-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5AuthError-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="Socks5AuthError-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5AuthError-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="Socks5AuthError-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="Socks5AuthError-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5AuthError-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<dl><dt><a name="Socks5AuthError-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="Socks5Error">class <strong>Socks5Error</strong></a>(<a href="httplib2.socks.html#ProxyError">ProxyError</a>)</font></td></tr>
    
<tr><td bgcolor="#ffc8d8"><tt>&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="httplib2.socks.html#Socks5Error">Socks5Error</a></dd>
<dd><a href="httplib2.socks.html#ProxyError">ProxyError</a></dd>
<dd><a href="exceptions.html#Exception">exceptions.Exception</a></dd>
<dd><a href="exceptions.html#BaseException">exceptions.BaseException</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Data descriptors inherited from <a href="httplib2.socks.html#ProxyError">ProxyError</a>:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><a name="Socks5Error-__init__"><strong>__init__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5Error-__init__">__init__</a>(...)&nbsp;initializes&nbsp;x;&nbsp;see&nbsp;x.__class__.__doc__&nbsp;for&nbsp;signature</tt></dd></dl>

<hr>
Data and other attributes inherited from <a href="exceptions.html#Exception">exceptions.Exception</a>:<br>
<dl><dt><strong>__new__</strong> = &lt;built-in method __new__ of type object&gt;<dd><tt>T.<a href="#Socks5Error-__new__">__new__</a>(S,&nbsp;...)&nbsp;-&gt;&nbsp;a&nbsp;new&nbsp;object&nbsp;with&nbsp;type&nbsp;S,&nbsp;a&nbsp;subtype&nbsp;of&nbsp;T</tt></dl>

<hr>
Methods inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><a name="Socks5Error-__delattr__"><strong>__delattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5Error-__delattr__">__delattr__</a>('name')&nbsp;&lt;==&gt;&nbsp;del&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="Socks5Error-__getattribute__"><strong>__getattribute__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5Error-__getattribute__">__getattribute__</a>('name')&nbsp;&lt;==&gt;&nbsp;x.name</tt></dd></dl>

<dl><dt><a name="Socks5Error-__getitem__"><strong>__getitem__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5Error-__getitem__">__getitem__</a>(y)&nbsp;&lt;==&gt;&nbsp;x[y]</tt></dd></dl>

<dl><dt><a name="Socks5Error-__getslice__"><strong>__getslice__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5Error-__getslice__">__getslice__</a>(i,&nbsp;j)&nbsp;&lt;==&gt;&nbsp;x[i:j]<br>
&nbsp;<br>
Use&nbsp;of&nbsp;negative&nbsp;indices&nbsp;is&nbsp;not&nbsp;supported.</tt></dd></dl>

<dl><dt><a name="Socks5Error-__reduce__"><strong>__reduce__</strong></a>(...)</dt></dl>

<dl><dt><a name="Socks5Error-__repr__"><strong>__repr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5Error-__repr__">__repr__</a>()&nbsp;&lt;==&gt;&nbsp;repr(x)</tt></dd></dl>

<dl><dt><a name="Socks5Error-__setattr__"><strong>__setattr__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5Error-__setattr__">__setattr__</a>('name',&nbsp;value)&nbsp;&lt;==&gt;&nbsp;x.name&nbsp;=&nbsp;value</tt></dd></dl>

<dl><dt><a name="Socks5Error-__setstate__"><strong>__setstate__</strong></a>(...)</dt></dl>

<dl><dt><a name="Socks5Error-__str__"><strong>__str__</strong></a>(...)</dt><dd><tt>x.<a href="#Socks5Error-__str__">__str__</a>()&nbsp;&lt;==&gt;&nbsp;str(x)</tt></dd></dl>

<dl><dt><a name="Socks5Error-__unicode__"><strong>__unicode__</strong></a>(...)</dt></dl>

<hr>
Data descriptors inherited from <a href="exceptions.html#BaseException">exceptions.BaseException</a>:<br>
<dl><dt><strong>__dict__</strong></dt>
</dl>
<dl><dt><strong>args</strong></dt>
</dl>
<dl><dt><strong>message</strong></dt>
</dl>
</td></tr></table> <p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#ffc8d8">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#000000" face="helvetica, arial"><a name="socksocket">class <strong>socksocket</strong></a>(<a href="socket.html#_socketobject">socket._socketobject</a>)</font></td></tr>
    
<tr bgcolor="#ffc8d8"><td rowspan=2><tt>&nbsp;&nbsp;&nbsp;</tt></td>
<td colspan=2><tt><a href="#socksocket">socksocket</a>([family[,&nbsp;type[,&nbsp;proto]]])&nbsp;-&gt;&nbsp;socket&nbsp;object<br>
Open&nbsp;a&nbsp;SOCKS&nbsp;enabled&nbsp;socket.&nbsp;The&nbsp;parameters&nbsp;are&nbsp;the&nbsp;same&nbsp;as<br>
those&nbsp;of&nbsp;the&nbsp;standard&nbsp;socket&nbsp;init.&nbsp;In&nbsp;order&nbsp;for&nbsp;SOCKS&nbsp;to&nbsp;work,<br>
you&nbsp;must&nbsp;specify&nbsp;family=AF_INET,&nbsp;type=SOCK_STREAM&nbsp;and&nbsp;proto=0.<br>&nbsp;</tt></td></tr>
<tr><td>&nbsp;</td>
<td width="100%"><dl><dt>Method resolution order:</dt>
<dd><a href="httplib2.socks.html#socksocket">socksocket</a></dd>
<dd><a href="socket.html#_socketobject">socket._socketobject</a></dd>
<dd><a href="__builtin__.html#object">__builtin__.object</a></dd>
</dl>
<hr>
Methods defined here:<br>
<dl><dt><a name="socksocket-__init__"><strong>__init__</strong></a>(self, family<font color="#909090">=2</font>, type<font color="#909090">=1</font>, proto<font color="#909090">=0</font>, _sock<font color="#909090">=None</font>)</dt></dl>

<dl><dt><a name="socksocket-connect"><strong>connect</strong></a>(self, destpair)</dt><dd><tt><a href="#socksocket-connect">connect</a>(self,&nbsp;despair)<br>
Connects&nbsp;to&nbsp;the&nbsp;specified&nbsp;destination&nbsp;through&nbsp;a&nbsp;proxy.<br>
destpar&nbsp;-&nbsp;A&nbsp;tuple&nbsp;of&nbsp;the&nbsp;IP/DNS&nbsp;address&nbsp;and&nbsp;the&nbsp;port&nbsp;number.<br>
(identical&nbsp;to&nbsp;socket's&nbsp;connect).<br>
To&nbsp;select&nbsp;the&nbsp;proxy&nbsp;server&nbsp;use&nbsp;<a href="#socksocket-setproxy">setproxy</a>().</tt></dd></dl>

<dl><dt><a name="socksocket-getpeername"><strong>getpeername</strong></a>(self)</dt><dd><tt><a href="#socksocket-getpeername">getpeername</a>()&nbsp;-&gt;&nbsp;address&nbsp;info<br>
Returns&nbsp;the&nbsp;IP&nbsp;address&nbsp;and&nbsp;port&nbsp;number&nbsp;of&nbsp;the&nbsp;destination<br>
machine&nbsp;(note:&nbsp;getproxypeername&nbsp;returns&nbsp;the&nbsp;proxy)</tt></dd></dl>

<dl><dt><a name="socksocket-getproxypeername"><strong>getproxypeername</strong></a>(self)</dt><dd><tt><a href="#socksocket-getproxypeername">getproxypeername</a>()&nbsp;-&gt;&nbsp;address&nbsp;info<br>
Returns&nbsp;the&nbsp;IP&nbsp;and&nbsp;port&nbsp;number&nbsp;of&nbsp;the&nbsp;proxy.</tt></dd></dl>

<dl><dt><a name="socksocket-getproxysockname"><strong>getproxysockname</strong></a>(self)</dt><dd><tt><a href="#socksocket-getsockname">getsockname</a>()&nbsp;-&gt;&nbsp;address&nbsp;info<br>
Returns&nbsp;the&nbsp;bound&nbsp;IP&nbsp;address&nbsp;and&nbsp;port&nbsp;number&nbsp;at&nbsp;the&nbsp;proxy.</tt></dd></dl>

<dl><dt><a name="socksocket-setproxy"><strong>setproxy</strong></a>(self, proxytype<font color="#909090">=None</font>, addr<font color="#909090">=None</font>, port<font color="#909090">=None</font>, rdns<font color="#909090">=True</font>, username<font color="#909090">=None</font>, password<font color="#909090">=None</font>)</dt><dd><tt><a href="#socksocket-setproxy">setproxy</a>(proxytype,&nbsp;addr[,&nbsp;port[,&nbsp;rdns[,&nbsp;username[,&nbsp;password]]]])<br>
Sets&nbsp;the&nbsp;proxy&nbsp;to&nbsp;be&nbsp;used.<br>
proxytype&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;type&nbsp;of&nbsp;the&nbsp;proxy&nbsp;to&nbsp;be&nbsp;used.&nbsp;Three&nbsp;types<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;are&nbsp;supported:&nbsp;PROXY_TYPE_SOCKS4&nbsp;(including&nbsp;socks4a),<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;PROXY_TYPE_SOCKS5&nbsp;and&nbsp;PROXY_TYPE_HTTP<br>
addr&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;address&nbsp;of&nbsp;the&nbsp;server&nbsp;(IP&nbsp;or&nbsp;DNS).<br>
port&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;port&nbsp;of&nbsp;the&nbsp;server.&nbsp;Defaults&nbsp;to&nbsp;1080&nbsp;for&nbsp;SOCKS<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;servers&nbsp;and&nbsp;8080&nbsp;for&nbsp;HTTP&nbsp;proxy&nbsp;servers.<br>
rdns&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Should&nbsp;DNS&nbsp;queries&nbsp;be&nbsp;preformed&nbsp;on&nbsp;the&nbsp;remote&nbsp;side<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(rather&nbsp;than&nbsp;the&nbsp;local&nbsp;side).&nbsp;The&nbsp;default&nbsp;is&nbsp;True.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Note:&nbsp;This&nbsp;has&nbsp;no&nbsp;effect&nbsp;with&nbsp;SOCKS4&nbsp;servers.<br>
username&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;Username&nbsp;to&nbsp;authenticate&nbsp;with&nbsp;to&nbsp;the&nbsp;server.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;The&nbsp;default&nbsp;is&nbsp;no&nbsp;authentication.<br>
password&nbsp;-&nbsp;&nbsp;&nbsp;&nbsp;Password&nbsp;to&nbsp;authenticate&nbsp;with&nbsp;to&nbsp;the&nbsp;server.<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Only&nbsp;relevant&nbsp;when&nbsp;username&nbsp;is&nbsp;also&nbsp;provided.</tt></dd></dl>

<hr>
Data descriptors defined here:<br>
<dl><dt><strong>__dict__</strong></dt>
<dd><tt>dictionary&nbsp;for&nbsp;instance&nbsp;variables&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<hr>
Methods inherited from <a href="socket.html#_socketobject">socket._socketobject</a>:<br>
<dl><dt><a name="socksocket-accept"><strong>accept</strong></a>(self)</dt><dd><tt><a href="#socksocket-accept">accept</a>()&nbsp;-&gt;&nbsp;(socket&nbsp;object,&nbsp;address&nbsp;info)<br>
&nbsp;<br>
Wait&nbsp;for&nbsp;an&nbsp;incoming&nbsp;connection.&nbsp;&nbsp;Return&nbsp;a&nbsp;new&nbsp;socket&nbsp;representing&nbsp;the<br>
connection,&nbsp;and&nbsp;the&nbsp;address&nbsp;of&nbsp;the&nbsp;client.&nbsp;&nbsp;For&nbsp;IP&nbsp;sockets,&nbsp;the&nbsp;address<br>
info&nbsp;is&nbsp;a&nbsp;pair&nbsp;(hostaddr,&nbsp;port).</tt></dd></dl>

<dl><dt><a name="socksocket-bind"><strong>bind</strong></a>(self, *args)</dt><dd><tt><a href="#socksocket-bind">bind</a>(address)<br>
&nbsp;<br>
Bind&nbsp;the&nbsp;socket&nbsp;to&nbsp;a&nbsp;local&nbsp;address.&nbsp;&nbsp;For&nbsp;IP&nbsp;sockets,&nbsp;the&nbsp;address&nbsp;is&nbsp;a<br>
pair&nbsp;(host,&nbsp;port);&nbsp;the&nbsp;host&nbsp;must&nbsp;refer&nbsp;to&nbsp;the&nbsp;local&nbsp;host.&nbsp;For&nbsp;raw&nbsp;packet<br>
sockets&nbsp;the&nbsp;address&nbsp;is&nbsp;a&nbsp;tuple&nbsp;(ifname,&nbsp;proto&nbsp;[,pkttype&nbsp;[,hatype]])</tt></dd></dl>

<dl><dt><a name="socksocket-close"><strong>close</strong></a>(self)</dt><dd><tt><a href="#socksocket-close">close</a>()<br>
&nbsp;<br>
Close&nbsp;the&nbsp;socket.&nbsp;&nbsp;It&nbsp;cannot&nbsp;be&nbsp;used&nbsp;after&nbsp;this&nbsp;call.</tt></dd></dl>

<dl><dt><a name="socksocket-connect_ex"><strong>connect_ex</strong></a>(self, *args)</dt><dd><tt><a href="#socksocket-connect_ex">connect_ex</a>(address)&nbsp;-&gt;&nbsp;errno<br>
&nbsp;<br>
This&nbsp;is&nbsp;like&nbsp;<a href="#socksocket-connect">connect</a>(address),&nbsp;but&nbsp;returns&nbsp;an&nbsp;error&nbsp;code&nbsp;(the&nbsp;errno&nbsp;value)<br>
instead&nbsp;of&nbsp;raising&nbsp;an&nbsp;exception&nbsp;when&nbsp;an&nbsp;error&nbsp;occurs.</tt></dd></dl>

<dl><dt><a name="socksocket-dup"><strong>dup</strong></a>(self)</dt><dd><tt><a href="#socksocket-dup">dup</a>()&nbsp;-&gt;&nbsp;socket&nbsp;object<br>
&nbsp;<br>
Return&nbsp;a&nbsp;new&nbsp;socket&nbsp;object&nbsp;connected&nbsp;to&nbsp;the&nbsp;same&nbsp;system&nbsp;resource.</tt></dd></dl>

<dl><dt><a name="socksocket-fileno"><strong>fileno</strong></a>(self, *args)</dt><dd><tt><a href="#socksocket-fileno">fileno</a>()&nbsp;-&gt;&nbsp;integer<br>
&nbsp;<br>
Return&nbsp;the&nbsp;integer&nbsp;file&nbsp;descriptor&nbsp;of&nbsp;the&nbsp;socket.</tt></dd></dl>

<dl><dt><a name="socksocket-getsockname"><strong>getsockname</strong></a>(self, *args)</dt><dd><tt><a href="#socksocket-getsockname">getsockname</a>()&nbsp;-&gt;&nbsp;address&nbsp;info<br>
&nbsp;<br>
Return&nbsp;the&nbsp;address&nbsp;of&nbsp;the&nbsp;local&nbsp;endpoint.&nbsp;&nbsp;For&nbsp;IP&nbsp;sockets,&nbsp;the&nbsp;address<br>
info&nbsp;is&nbsp;a&nbsp;pair&nbsp;(hostaddr,&nbsp;port).</tt></dd></dl>

<dl><dt><a name="socksocket-getsockopt"><strong>getsockopt</strong></a>(self, *args)</dt><dd><tt><a href="#socksocket-getsockopt">getsockopt</a>(level,&nbsp;option[,&nbsp;buffersize])&nbsp;-&gt;&nbsp;value<br>
&nbsp;<br>
Get&nbsp;a&nbsp;socket&nbsp;option.&nbsp;&nbsp;See&nbsp;the&nbsp;Unix&nbsp;manual&nbsp;for&nbsp;level&nbsp;and&nbsp;option.<br>
If&nbsp;a&nbsp;nonzero&nbsp;buffersize&nbsp;argument&nbsp;is&nbsp;given,&nbsp;the&nbsp;return&nbsp;value&nbsp;is&nbsp;a<br>
string&nbsp;of&nbsp;that&nbsp;length;&nbsp;otherwise&nbsp;it&nbsp;is&nbsp;an&nbsp;integer.</tt></dd></dl>

<dl><dt><a name="socksocket-gettimeout"><strong>gettimeout</strong></a>(self, *args)</dt><dd><tt><a href="#socksocket-gettimeout">gettimeout</a>()&nbsp;-&gt;&nbsp;timeout<br>
&nbsp;<br>
Returns&nbsp;the&nbsp;timeout&nbsp;in&nbsp;floating&nbsp;seconds&nbsp;associated&nbsp;with&nbsp;socket&nbsp;<br>
operations.&nbsp;A&nbsp;timeout&nbsp;of&nbsp;None&nbsp;indicates&nbsp;that&nbsp;timeouts&nbsp;on&nbsp;socket&nbsp;<br>
operations&nbsp;are&nbsp;disabled.</tt></dd></dl>

<dl><dt><a name="socksocket-listen"><strong>listen</strong></a>(self, *args)</dt><dd><tt><a href="#socksocket-listen">listen</a>(backlog)<br>
&nbsp;<br>
Enable&nbsp;a&nbsp;server&nbsp;to&nbsp;accept&nbsp;connections.&nbsp;&nbsp;The&nbsp;backlog&nbsp;argument&nbsp;must&nbsp;be&nbsp;at<br>
least&nbsp;1;&nbsp;it&nbsp;specifies&nbsp;the&nbsp;number&nbsp;of&nbsp;unaccepted&nbsp;connection&nbsp;that&nbsp;the&nbsp;system<br>
will&nbsp;allow&nbsp;before&nbsp;refusing&nbsp;new&nbsp;connections.</tt></dd></dl>

<dl><dt><a name="socksocket-makefile"><strong>makefile</strong></a>(self, mode<font color="#909090">='r'</font>, bufsize<font color="#909090">=-1</font>)</dt><dd><tt><a href="#socksocket-makefile">makefile</a>([mode[,&nbsp;bufsize]])&nbsp;-&gt;&nbsp;file&nbsp;object<br>
&nbsp;<br>
Return&nbsp;a&nbsp;regular&nbsp;file&nbsp;object&nbsp;corresponding&nbsp;to&nbsp;the&nbsp;socket.&nbsp;&nbsp;The&nbsp;mode<br>
and&nbsp;bufsize&nbsp;arguments&nbsp;are&nbsp;as&nbsp;for&nbsp;the&nbsp;built-in&nbsp;open()&nbsp;function.</tt></dd></dl>

<dl><dt><a name="socksocket-sendall"><strong>sendall</strong></a>(self, *args)</dt><dd><tt><a href="#socksocket-sendall">sendall</a>(data[,&nbsp;flags])<br>
&nbsp;<br>
Send&nbsp;a&nbsp;data&nbsp;string&nbsp;to&nbsp;the&nbsp;socket.&nbsp;&nbsp;For&nbsp;the&nbsp;optional&nbsp;flags<br>
argument,&nbsp;see&nbsp;the&nbsp;Unix&nbsp;manual.&nbsp;&nbsp;This&nbsp;calls&nbsp;<a href="#socksocket-send">send</a>()&nbsp;repeatedly<br>
until&nbsp;all&nbsp;data&nbsp;is&nbsp;sent.&nbsp;&nbsp;If&nbsp;an&nbsp;error&nbsp;occurs,&nbsp;it's&nbsp;impossible<br>
to&nbsp;tell&nbsp;how&nbsp;much&nbsp;data&nbsp;has&nbsp;been&nbsp;sent.</tt></dd></dl>

<dl><dt><a name="socksocket-setblocking"><strong>setblocking</strong></a>(self, *args)</dt><dd><tt><a href="#socksocket-setblocking">setblocking</a>(flag)<br>
&nbsp;<br>
Set&nbsp;the&nbsp;socket&nbsp;to&nbsp;blocking&nbsp;(flag&nbsp;is&nbsp;true)&nbsp;or&nbsp;non-blocking&nbsp;(false).<br>
<a href="#socksocket-setblocking">setblocking</a>(True)&nbsp;is&nbsp;equivalent&nbsp;to&nbsp;<a href="#socksocket-settimeout">settimeout</a>(None);<br>
<a href="#socksocket-setblocking">setblocking</a>(False)&nbsp;is&nbsp;equivalent&nbsp;to&nbsp;<a href="#socksocket-settimeout">settimeout</a>(0.0).</tt></dd></dl>

<dl><dt><a name="socksocket-setsockopt"><strong>setsockopt</strong></a>(self, *args)</dt><dd><tt><a href="#socksocket-setsockopt">setsockopt</a>(level,&nbsp;option,&nbsp;value)<br>
&nbsp;<br>
Set&nbsp;a&nbsp;socket&nbsp;option.&nbsp;&nbsp;See&nbsp;the&nbsp;Unix&nbsp;manual&nbsp;for&nbsp;level&nbsp;and&nbsp;option.<br>
The&nbsp;value&nbsp;argument&nbsp;can&nbsp;either&nbsp;be&nbsp;an&nbsp;integer&nbsp;or&nbsp;a&nbsp;string.</tt></dd></dl>

<dl><dt><a name="socksocket-settimeout"><strong>settimeout</strong></a>(self, *args)</dt><dd><tt><a href="#socksocket-settimeout">settimeout</a>(timeout)<br>
&nbsp;<br>
Set&nbsp;a&nbsp;timeout&nbsp;on&nbsp;socket&nbsp;operations.&nbsp;&nbsp;'timeout'&nbsp;can&nbsp;be&nbsp;a&nbsp;float,<br>
giving&nbsp;in&nbsp;seconds,&nbsp;or&nbsp;None.&nbsp;&nbsp;Setting&nbsp;a&nbsp;timeout&nbsp;of&nbsp;None&nbsp;disables<br>
the&nbsp;timeout&nbsp;feature&nbsp;and&nbsp;is&nbsp;equivalent&nbsp;to&nbsp;<a href="#socksocket-setblocking">setblocking</a>(1).<br>
Setting&nbsp;a&nbsp;timeout&nbsp;of&nbsp;zero&nbsp;is&nbsp;the&nbsp;same&nbsp;as&nbsp;<a href="#socksocket-setblocking">setblocking</a>(0).</tt></dd></dl>

<dl><dt><a name="socksocket-shutdown"><strong>shutdown</strong></a>(self, *args)</dt><dd><tt><a href="#socksocket-shutdown">shutdown</a>(flag)<br>
&nbsp;<br>
Shut&nbsp;down&nbsp;the&nbsp;reading&nbsp;side&nbsp;of&nbsp;the&nbsp;socket&nbsp;(flag&nbsp;==&nbsp;SHUT_RD),&nbsp;the&nbsp;writing&nbsp;side<br>
of&nbsp;the&nbsp;socket&nbsp;(flag&nbsp;==&nbsp;SHUT_WR),&nbsp;or&nbsp;both&nbsp;ends&nbsp;(flag&nbsp;==&nbsp;SHUT_RDWR).</tt></dd></dl>

<hr>
Data descriptors inherited from <a href="socket.html#_socketobject">socket._socketobject</a>:<br>
<dl><dt><strong>__weakref__</strong></dt>
<dd><tt>list&nbsp;of&nbsp;weak&nbsp;references&nbsp;to&nbsp;the&nbsp;object&nbsp;(if&nbsp;defined)</tt></dd>
</dl>
<dl><dt><strong>family</strong></dt>
<dd><tt>the&nbsp;socket&nbsp;family</tt></dd>
</dl>
<dl><dt><strong>proto</strong></dt>
<dd><tt>the&nbsp;socket&nbsp;protocol</tt></dd>
</dl>
<dl><dt><strong>recv</strong></dt>
</dl>
<dl><dt><strong>recv_into</strong></dt>
</dl>
<dl><dt><strong>recvfrom</strong></dt>
</dl>
<dl><dt><strong>recvfrom_into</strong></dt>
</dl>
<dl><dt><strong>send</strong></dt>
</dl>
<dl><dt><strong>sendto</strong></dt>
</dl>
<dl><dt><strong>type</strong></dt>
<dd><tt>the&nbsp;socket&nbsp;type</tt></dd>
</dl>
</td></tr></table></td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#eeaa77">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Functions</strong></big></font></td></tr>
    
<tr><td bgcolor="#eeaa77"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><dl><dt><a name="-setdefaultproxy"><strong>setdefaultproxy</strong></a>(proxytype<font color="#909090">=None</font>, addr<font color="#909090">=None</font>, port<font color="#909090">=None</font>, rdns<font color="#909090">=True</font>, username<font color="#909090">=None</font>, password<font color="#909090">=None</font>)</dt><dd><tt><a href="#-setdefaultproxy">setdefaultproxy</a>(proxytype,&nbsp;addr[,&nbsp;port[,&nbsp;rdns[,&nbsp;username[,&nbsp;password]]]])<br>
Sets&nbsp;a&nbsp;default&nbsp;proxy&nbsp;which&nbsp;all&nbsp;further&nbsp;<a href="#socksocket">socksocket</a>&nbsp;objects&nbsp;will&nbsp;use,<br>
unless&nbsp;explicitly&nbsp;changed.</tt></dd></dl>
 <dl><dt><a name="-wrapmodule"><strong>wrapmodule</strong></a>(module)</dt><dd><tt><a href="#-wrapmodule">wrapmodule</a>(module)<br>
Attempts&nbsp;to&nbsp;replace&nbsp;a&nbsp;module's&nbsp;socket&nbsp;library&nbsp;with&nbsp;a&nbsp;SOCKS&nbsp;socket.&nbsp;Must&nbsp;set<br>
a&nbsp;default&nbsp;proxy&nbsp;using&nbsp;<a href="#-setdefaultproxy">setdefaultproxy</a>(...)&nbsp;first.<br>
This&nbsp;will&nbsp;only&nbsp;work&nbsp;on&nbsp;modules&nbsp;that&nbsp;import&nbsp;socket&nbsp;directly&nbsp;into&nbsp;the&nbsp;namespace;<br>
most&nbsp;of&nbsp;the&nbsp;Python&nbsp;Standard&nbsp;Library&nbsp;falls&nbsp;into&nbsp;this&nbsp;category.</tt></dd></dl>
</td></tr></table><p>
<table width="100%" cellspacing=0 cellpadding=2 border=0 summary="section">
<tr bgcolor="#55aa55">
<td colspan=3 valign=bottom>&nbsp;<br>
<font color="#ffffff" face="helvetica, arial"><big><strong>Data</strong></big></font></td></tr>
    
<tr><td bgcolor="#55aa55"><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt></td><td>&nbsp;</td>
<td width="100%"><strong>PROXY_TYPE_HTTP</strong> = 3<br>
<strong>PROXY_TYPE_SOCKS4</strong> = 1<br>
<strong>PROXY_TYPE_SOCKS5</strong> = 2</td></tr></table>
</body></html>